/*    */ package client;
/*    */ 
/*    */ import com.fasterxml.jackson.annotation.JsonProperty;
/*    */ import java.util.List;
/*    */ import server.maps.AnimatedMapleMapObject;
/*    */ import server.maps.MapleMapObjectType;
/*    */ import server.movement.LifeMovement;
/*    */ import server.movement.LifeMovementFragment;
/*    */ import tools.packet.FamiliarPacket;
/*    */ 
/*    */ public class MonsterFamiliarObj
/*    */   extends AnimatedMapleMapObject {
/*    */   private MonsterFamiliar familiar;
/*    */   
/*    */   public MonsterFamiliarObj(@JsonProperty("familiar") MonsterFamiliar familiar) {
/* 16 */     this.familiar = familiar;
/*    */   }
/*    */   
/*    */   public MonsterFamiliar getFamiliar() {
/* 20 */     return this.familiar;
/*    */   }
/*    */ 
/*    */   
/*    */   public void sendSpawnData(MapleClient client) {
/* 25 */     client.announce(FamiliarPacket.SpawnFamiliar(this.familiar, client));
/*    */   }
/*    */ 
/*    */   
/*    */   public void sendDestroyData(MapleClient client) {
/* 30 */     client.announce(FamiliarPacket.RemoveFamiliar(this.familiar));
/*    */   }
/*    */ 
/*    */   
/*    */   public MapleMapObjectType getType() {
/* 35 */     return MapleMapObjectType.FAMILIAR;
/*    */   }
/*    */   
/*    */   public final void updatePosition(List<LifeMovementFragment> movement) {
/* 39 */     for (LifeMovementFragment move : movement) {
/* 40 */       if (move instanceof LifeMovement)
/* 41 */         setStance(((LifeMovement)move).getNewstate()); 
/*    */     } 
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\client\MonsterFamiliarObj.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */